import Mock from 'mockjs';

let trainer = [{
		key: "/trainer/all",
		method: "get",
		data: Mock.mock({
			'STATUS': "SUCCESS",
			'data': {
				'trainer': {
					"trainerId": '@increment(1)',
					"name": "@cname()",
					"age|2": /[1-9]/,
					"sex": '@boolean()',
					"phone|11": /[0-9]/,
					"ic|18": /[0-9]/,
					"address": "@province()@city()@county()",
					"des": "cparagraph()",
					"openId": "1",
					"activeFlg": false,
					"delFlg": true
				},
				
			}
		})
	},

	{
		key: "/trainer/list",
		method: "get",
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|10": [{
						"trainerId": '@increment(1)',
						"name": "@cname()",
						"age|2": /[1-9]/,
						"sex": '@boolean()',
						"phone|11": /[0-9]/,
						"ic|18": /[0-9]/,
						"address": "@province()@city()@county()",
						"des": "cparagraph()",
						"openId": "1",
						"activeFlg": false,
						"delFlg": true
					}]
				}
			});
		}
	},
	{
		key: "/trainer/info",
		method: "get",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': {
                    "trainerId": '@increment(1)',
                    "name": "@cname()",
                    "age|2": /[1-9]/,
                    "sex": '@boolean()',
                    "phone|11": /[0-9]/,
                    "ic|18": /[0-9]/,
                    "address": "@province()@city()@county()",
                    "des": "cparagraph()",
                    "openId": "1",
                    "activeFlg": false,
                    "delFlg": true,
				}
			})
		}
	},
	{
		key: "/trainer/info",
		method: "put",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': "",
			});
		}
	},
	{
		key: "/trainer/info",
		method: "post",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': "",
			});
		}
	}
];

export default trainer;
